$(function(){
	
	// shcontainer is the DOM element;
	// userText is the textbox
	
	var shcontainer = $("#shcontainer")
		userText = $('#userText'); 
	
	// Shuffle the contents of shcontainer
	shcontainer.shuffleLetters();

	// Bind events
	userText.click(function () {
	
	  userText.val("");
	 
	}).bind('keypress',function(e){
		
		if(e.keyCode == 13){
			
			// The return key was pressed
			
			shcontainer.shuffleLetters({
				"text": userText.val()
			});
			
			userText.val("");
		}

	}).hide();

	// Leave a 4 second pause

	setTimeout(function(){
		
		// Shuffle the shcontainer with custom text
		shcontainer.shuffleLetters({
		"text": "Oonjal.. universal translator with the accent..."
		});
		
		//userText.val("OOnjal. You talk..").fadeIn();
		
	},8000);
	
});

